<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:System.Windows.Controls"
    xmlns:DGTB="clr-namespace:System.Windows.Controls.DGTB"
		xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
	>

	<Style TargetType="local:DataGridToolBarBase">
		<Setter Property="Height" Value="40" />
		<Setter Property="Background" Value="#FFF2F3F4"/>
		<Setter Property="BorderBrush">
			<Setter.Value>
				<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
					<GradientStop Color="#FFA3AEB9" Offset="0"/>
					<GradientStop Color="#FF8399A9" Offset="0.375"/>
					<GradientStop Color="#FF718597" Offset="0.375"/>
					<GradientStop Color="#FF617584" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="BorderThickness" Value="1" />
		<!--<Setter Property="Padding" Value="1" />-->
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:DataGridToolBarBase">
					<!-- maDataGridFilter Control Parts -->
					<Border Name="Root"
							MinHeight="24" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
										BorderThickness="{TemplateBinding BorderThickness}"	
										Padding="{TemplateBinding Padding}"
										CornerRadius="2"
										>
						<Border.Resources>
							<SolidColorBrush x:Key="BackgroundColor" Color="#00000000"/>
							<SolidColorBrush x:Key="ForegroundColor" Color="#FF000000"/>
							<SolidColorBrush x:Key="BorderBrushColor" Color="#FFFFFFFF"/>
							<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
								<Grid>
									<vsm:VisualStateManager.VisualStateGroups>
										<vsm:VisualStateGroup x:Name="CommonStates">
											<vsm:VisualState x:Name="Normal"/>
											<vsm:VisualState x:Name="MouseOver">
												<Storyboard>
													<ColorAnimation Duration="0" Storyboard.TargetName="OuterBtnBorder" Storyboard.TargetProperty="(BorderBrush).Color" To="#FFFFFFFF"/>
													<ColorAnimation Duration="0" Storyboard.TargetName="InnerBtnBorder" Storyboard.TargetProperty="(BorderBrush).Color" To="#FFCCD1D6"/>
												</Storyboard>
											</vsm:VisualState>
											<vsm:VisualState x:Name="Pressed">
												<Storyboard>
													<ColorAnimation Duration="0" Storyboard.TargetName="OuterBtnBorder" Storyboard.TargetProperty="(BorderBrush).Color" To="#FFFFFFFF"/>
													<ColorAnimation Duration="0" Storyboard.TargetName="InnerBtnBorder" Storyboard.TargetProperty="(BorderBrush).Color" To="#00FFFFFF"/>
												</Storyboard>
											</vsm:VisualState>
											<vsm:VisualState x:Name="Disabled">
												<Storyboard>
													<DoubleAnimation Duration="0" Storyboard.TargetName="path" Storyboard.TargetProperty="Opacity" To="0.15"/>
												</Storyboard>
											</vsm:VisualState>
										</vsm:VisualStateGroup>
										<vsm:VisualStateGroup x:Name="FocusStates">
											<vsm:VisualState x:Name="Focused">
												<Storyboard>
													<DoubleAnimation Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" To="1"/>
												</Storyboard>
											</vsm:VisualState>
											<vsm:VisualState x:Name="Unfocused"/>
										</vsm:VisualStateGroup>
									</vsm:VisualStateManager.VisualStateGroups>
									<Border x:Name="OuterBtnBorder" BorderBrush="#00FFFFFF" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
										<Border x:Name="InnerBtnBorder" BorderBrush="#00CCD1D6" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
											<ContentPresenter x:Name="path" Content="{TemplateBinding Content}"/>
										</Border>
									</Border>
									<Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Margin="1" Opacity="0"/>
								</Grid>
							</ControlTemplate>
							<Style x:Key="buStyle" TargetType="Button">
								<Setter Property="Height" Value="20" />
								<Setter Property="Width" Value="20" />
								<Setter Property="IsTabStop" Value="False"/>
								<Setter Property="BorderThickness" Value="1"/> 
								<Setter Property="Padding" Value="1" />
								<Setter Property="HorizontalAlignment" Value="Right" />
								<Setter Property="VerticalAlignment" Value="Center" />
								<Setter Property="Background" Value="{StaticResource BackgroundColor}" />
								<Setter Property="Foreground" Value="{StaticResource ForegroundColor}" />
								<Setter Property="BorderBrush" Value="{StaticResource BorderBrushColor}" />
							</Style>
						</Border.Resources>
						<Grid  Background="Transparent">
							<Grid.Resources>
							</Grid.Resources>
							<Grid.RowDefinitions>
								<RowDefinition Height="Auto" />
								<RowDefinition  />
							</Grid.RowDefinitions>
							<Grid >
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
									<!-- RemoveButton -->
									<Button x:Name="RemoveButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid Height="10" Width="10"   >
												<Polygon StrokeThickness="0.5" Points="0.5,3.5,9.5,3.5,9.5,6.5,0.5,6.5" Stroke="#FFD8685C" Fill="#FFFFE800" ></Polygon>
											</Grid>
										</Button.Content>
									</Button>
									<!-- buAddNewButton-->
									<Button x:Name="AddNewButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid  Height="10" Width="10"   >
												<Polygon StrokeThickness="1" Points="3.5,0.5,3.5,3.5,0.5,3.5,0.5,6.5,3.5,6.5,3.5,9.5,6.5,9.5,6.5,6.5,9.5,6.5,9.5,3.5,6.5,3.5,6.5,0.5" Stroke="Black" Fill="#FFFFE800" ></Polygon>
											</Grid>
										</Button.Content>
									</Button>
									<!-- buEditButton-->
									<Button x:Name="EditButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid  Height="10" Width="10"   >
												<Polygon StrokeThickness="0.4" Stroke="Black" Fill="#FFF1E590" StrokeLineJoin="Bevel" 
		Points="0,10 ,1,6.5 ,2,6.5 ,3.5,8 ,3.5,9 "
		/>
												<Polygon StrokeThickness="0.4" Stroke="Black" Fill="#FF5DE053" StrokeLineJoin="Bevel"
		Points="7.5,0 ,1,6.5 ,2,6.5 ,2,8 ,3.5,8 ,3.5,9 ,10,2.5" />

												<Polygon StrokeThickness="0.4" Stroke="Black" Fill="#FF5DE053" StrokeLineJoin="Bevel"
		Points="0,10 ,0.5,8.5 ,1.5,9.5" />
											</Grid>
										</Button.Content>
									</Button>
									<!-- FilterButton -->
									<Button x:Name="FilterButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid Height="10" Width="10"   >
												<Polygon Fill="#FF3399FF" Points="0,0,3,5,3,10,7,10,7,5,10,0" />
											</Grid>
										</Button.Content>
									</Button>
									<!--ClearFilterButton-->
									<Button x:Name="ClearFilterButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid Height="10" Width="10"   >
												<Polygon Fill="#FF3399FF" Points="0,0,3,5,3,10,7,10,7,5,10,0" />
												<Line  VerticalAlignment="Bottom" Height="7" Width="10"  X1="0" Y1="0" X2="10" Y2="7" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle"  Opacity="0.5" />
												<Line VerticalAlignment="Bottom" Height="7" Width="10"  X1="0" Y1="7" X2="10" Y2="0" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle"  Opacity="0.5" />
											</Grid>
										</Button.Content>
									</Button>
									<!-- RefreshButton -->
									<Button x:Name="RefreshButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}">
										<Button.Content>
											<Grid  Height="10" Width="10" >
												<Grid />
												<Path Height="10" Width="10" Fill="Green" UseLayoutRounding="False"
								Data="M 10,0 	L 10,5 	L 5,5 L 6.5,3.5 C 5,2 2,3 1,4 C 1,1 6,0 8.5,1.5	Z" />

												<Path Height="10" Width="10" Fill="Green"
								Data="M 10,0 	L 10,5 	L 5,5 L 6.5,3.5 C 5,2 2,3 1,4 C 1,1 6,0 8.5,1.5	Z" RenderTransformOrigin="0.5,0.5" >
													<Path.RenderTransform>
														<TransformGroup>
															<ScaleTransform ScaleX="-1" ScaleY="-1"/>
															<TranslateTransform/>
														</TransformGroup>
													</Path.RenderTransform>
												</Path>
											</Grid>
										</Button.Content>
									</Button>
									<!-- SaveButton -->
									<Button x:Name="SaveButton" Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}" Visibility="Collapsed">
										<Button.Content>
											<Grid x:Name="LayoutRoot" Height="10" Width="10" Background="white"   >
												<Path Stroke="#FF233B78" StrokeThickness="0.7" Fill="#FF80BEE4" >
													<Path.Data>
														<PathGeometry>
															<PathGeometry.Figures>
																<PathFigure StartPoint="1.5,0.5">
																	<LineSegment Point="8.5,0.5" />
																	<ArcSegment Size="1,1" RotationAngle="0"
                IsLargeArc="False" SweepDirection="Clockwise"
                Point="9.5,1.5"/>
																	<LineSegment Point="9.5,8.5" />
																	<ArcSegment Size="1,1" RotationAngle="0"
                IsLargeArc="False" SweepDirection="Clockwise"
                Point="8.5,9.5"/>
																	<LineSegment Point="1.5,9.5" />
																	<ArcSegment Size="1,1" RotationAngle="0"
                IsLargeArc="False" SweepDirection="Clockwise"
                Point="0.5,8.5"/>
																	<LineSegment Point="0.5,1.5" />
																	<ArcSegment Size="1,1" RotationAngle="0"
                IsLargeArc="False" SweepDirection="Clockwise"
                Point="1.5,0.5"/>
																</PathFigure>
															</PathGeometry.Figures>
														</PathGeometry>
													</Path.Data>
												</Path>
												<Polyline StrokeThickness="0.5" Fill="#FFDADBE0" Stroke="#FF686A6E"
		Points="1.7,1.5,8.3,1.5,8.3,4.5,1.7,4.5,1.7,1.5" 
		/>
											</Grid>
										</Button.Content>
									</Button>
									<!-- RejectChangesButton -->
                  <Button x:Name="RejectChangesButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}" Visibility="Collapsed">
										<Button.Content>
											<Grid Height="9" Width="9"   >
												<Line  Height="9" Width="9"  X1="0" Y1="0" X2="9" Y2="9" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle"  >
												</Line>
												<Line  Height="9" Width="9"  X1="0" Y1="9" X2="9" Y2="0" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle" />
											</Grid>
										</Button.Content>
									</Button>
                  <!-- CancelButton -->
                  <Button x:Name="CancelButton"  Style="{StaticResource buStyle}" Template="{StaticResource ButtonTemplate}" Visibility="Collapsed">
                    <Button.Content>
                      <Grid Height="9" Width="9"   >
                        <Line  Height="9" Width="9"  X1="0" Y1="0" X2="9" Y2="9" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle"  >
                        </Line>
                        <Line  Height="9" Width="9"  X1="0" Y1="9" X2="9" Y2="0" StrokeThickness="2" Stroke="Red"
								StrokeStartLineCap="Triangle" StrokeEndLineCap="Triangle" />
                      </Grid>
                    </Button.Content>
                  </Button>
                  <!-- Message State -->
                  <TextBlock x:Name="StateMessage" Margin="3,0,0,0" VerticalAlignment="Center">
                    
                  </TextBlock>
                </StackPanel>
								<!--Tady bude asi DataPager-->
								<ContentPresenter x:Name="Pager" Grid.Column="1"  HorizontalAlignment="Stretch" >
								</ContentPresenter>
							</Grid>
							<TextBlock x:Name="FilterMessage" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Center" Margin="6,0,1,2">

							</TextBlock>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


	<Style TargetType="DGTB:DataFormWindow">
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="TabNavigation" Value="Cycle"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA3AEB9" Offset="0"/>
					<GradientStop Color="#FF8399A9" Offset="0.375"/>
					<GradientStop Color="#FF718597" Offset="0.375"/>
					<GradientStop Color="#FF617584" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="OverlayBrush" Value="#7F000000"/>
		<Setter Property="OverlayOpacity" Value="1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="DGTB:DataFormWindow">
					<Grid x:Name="Root">
						<Grid.Resources>
							<Style x:Key="ButtonStyle" TargetType="Button">
								<Setter Property="Background" Value="#FF1F3B53"/>
								<Setter Property="Foreground" Value="#FF000000"/>
								<Setter Property="Padding" Value="3"/>
								<Setter Property="BorderThickness" Value="1"/>
								<Setter Property="BorderBrush">
									<Setter.Value>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#FFA3AEB9" Offset="0"/>
											<GradientStop Color="#FF8399A9" Offset="0.375"/>
											<GradientStop Color="#FF718597" Offset="0.375"/>
											<GradientStop Color="#FF617584" Offset="1"/>
										</LinearGradientBrush>
									</Setter.Value>
								</Setter>
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate TargetType="Button">
											<Grid x:Name="grid" Background="#02FFFFFF" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="15">
												<VisualStateManager.VisualStateGroups>
													<VisualStateGroup x:Name="CommonStates">
														<VisualState x:Name="Normal"/>
														<VisualState x:Name="MouseOver">
															<Storyboard>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
																<DoubleAnimation Duration="0" To="0.95" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
															</Storyboard>
														</VisualState>
														<VisualState x:Name="Pressed">
															<Storyboard>
																<DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
																<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
																	<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
																</ObjectAnimationUsingKeyFrames>
															</Storyboard>
														</VisualState>
														<VisualState x:Name="Disabled">
															<Storyboard>
																<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
															</Storyboard>
														</VisualState>
													</VisualStateGroup>
												</VisualStateManager.VisualStateGroups>
												<Path x:Name="X_Fuzz2" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#14C51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#14C51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
													<Path.RenderTransform>
														<TransformGroup>
															<ScaleTransform ScaleY="1.3" ScaleX="1.3"/>
														</TransformGroup>
													</Path.RenderTransform>
												</Path>
												<Path x:Name="X_Fuzz1" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#1EC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#1EC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
													<Path.RenderTransform>
														<TransformGroup>
															<ScaleTransform ScaleY="1.1" ScaleX="1.1"/>
														</TransformGroup>
													</Path.RenderTransform>
												</Path>
												<Path x:Name="X_Fuzz0" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" Stretch="Fill" Stroke="#FFC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9"/>
												<Path x:Name="X" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="0.7" Stretch="Fill" VerticalAlignment="Center" Width="9">
													<Path.Stroke>
														<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
															<GradientStop Color="#FF313131" Offset="1"/>
															<GradientStop Color="#FF8E9092" Offset="0"/>
														</LinearGradientBrush>
													</Path.Stroke>
												</Path>
											</Grid>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
						</Grid.Resources>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="WindowStates">
								<VisualState x:Name="Open">
								</VisualState>
								<VisualState x:Name="Closed">
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment="Top"/>
						<Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
							<Grid.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform/>
									<RotateTransform/>
									<TranslateTransform/>
								</TransformGroup>
							</Grid.RenderTransform>
							<Border BorderBrush="#14000000" BorderThickness="1" Background="#14000000" CornerRadius="2" HorizontalAlignment="Stretch" Margin="-1" VerticalAlignment="Stretch"/>
							<Border BorderBrush="#0F000000" BorderThickness="1" Background="#0F000000" CornerRadius="2.25" HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"/>
							<Border BorderBrush="#0C000000" BorderThickness="1" Background="#0C000000" CornerRadius="2.5" HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"/>
							<Border BorderBrush="#0A000000" BorderThickness="1" Background="#0A000000" CornerRadius="2.75" HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"/>
							<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" CornerRadius="2">
								<Border CornerRadius="1.5" Margin="1">
									<Border.Background>
										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
											<GradientStop Color="#FFE5E8EB" Offset="1"/>
											<GradientStop Color="#FFF6F8F9" Offset="0"/>
										</LinearGradientBrush>
									</Border.Background>
									<Grid>
										<Grid.RowDefinitions>
											<RowDefinition Height="Auto"/>
											<RowDefinition/>
										</Grid.RowDefinitions>
										<Border x:Name="Chrome" BorderBrush="#FFFFFFFF" BorderThickness="0,0,0,1" Width="Auto">
											<Border.Background>
												<LinearGradientBrush EndPoint="0.5,0.528" StartPoint="0.5,0">
													<GradientStop Color="#FFE5E8EB" Offset="1"/>
													<GradientStop Color="#FFFEFEFE" Offset="0"/>
												</LinearGradientBrush>
											</Border.Background>
											<Grid Height="Auto" Width="Auto">
												<Grid.ColumnDefinitions>
													<ColumnDefinition/>
													<ColumnDefinition Width="30"/>
												</Grid.ColumnDefinitions>
												<ContentControl Content="{TemplateBinding Title}" FontWeight="Bold" HorizontalAlignment="Stretch" IsTabStop="False" Margin="6,0,6,0" VerticalAlignment="Center"/>
												<Button x:Name="CloseButton" Grid.Column="1" HorizontalAlignment="Center" Height="14" IsTabStop="False" Style="{StaticResource ButtonStyle}" VerticalAlignment="Center" Width="15"/>
											</Grid>
										</Border>
										<Border Background="{TemplateBinding Background}" Margin="7" Grid.Row="1">
											<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
										</Border>
									</Grid>
								</Border>
							</Border>
						</Grid>
						<Border x:Name="elementBusy" CornerRadius="5" Background="Black" Opacity="0.4" Visibility="Visible"></Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>



  <Style TargetType="local:WaitControl">
    <Setter Property="Background" Value="#70808080"/>
    <Setter Property="Visibility" Value="Collapsed"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:WaitControl">
          <Border 
            Visibility="{TemplateBinding Visibility}"
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}">
            <StackPanel Height="100" Width="100">
              <Button Content="Cancel" x:Name="ButtonCancel" Visibility="Collapsed" Width="80" Height="40"/>
            </StackPanel>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>
